import baseStore from "@/store/index";
const store = baseStore()
export function config(data:any){
  data.contractDetails = [
    {
      prop: 'contractCode',
      label: '合同编号：',
    },
    {
      prop: 'contractType',
      label: '合同类型：',
      formatter: (row: any) => {
        return store.dict['contractType'].obj[row.contractType]
      }
    },
    {
      prop: 'groupCompanyName',
      label: '集团公司：',
    },
    {
      prop: 'projectName',
      label: '所属项目名称：',
    },
    {
      prop: 'projectCode',
      label: '所属项目编码：',
    },
    {
      prop: 'assetsNames',
      label: '租赁资产名称：',
    },
    {
      prop: 'assetsCodes',
      label: '资产编码：',
    },
    {
      prop: 'leaseStartTime',
      label: '租赁开始日期：',
    },
    {
      prop: 'leaseEndTime',
      label: '租赁结束日期：',
    },
    {
      prop: 'incomeDivideType',
      label: '收入分成方式：'
    },
    {
      prop: 'chargCompanyId',
      label: '计费单位：',
      formatter: (row: any) => {
        return store.dict['chargCompanyId'].obj[row.chargCompanyId]
      }
    },
    {
      prop: 'rentModeId',
      label: '租金方式：',
      formatter: (row: any) => {
        return store.dict['rentModeId'].obj[row.rentModeId]
      }
    },
    {
      prop: 'brand',
      label: '品牌：',
    },
    {
      prop: 'rentPaymentCycleId',
      label: '租金支付周期：',
      formatter: (row: any) => {
        return store.dict['rentPaymentCycleId'].obj[row.rentPaymentCycleId]
      }
    },
    {
      prop: 'propertyManagePayCycleId',
      label: '物管费支付周期：',
      formatter: (row: any) => {
        return store.dict['propertyManagePayCycleId'].obj[row.propertyManagePayCycleId]
      }
    },
    {
      prop: 'rentTotalMoney',
      label: '租金总额：',
    },
    {
      prop: 'propertyManageTotalMoney',
      label: '物管费总额',
    },
    {
      prop: 'lessee',
      label: '承租人：',
    },
    {
      prop: 'lesseeContactMode',
      label: '承租人联系方式：',
    },
    {
      prop: 'remark',
      label: '备注：',
    },
  ],
  data.billTableConfig = [
    {
      label: '账单月',
      width: 100,
      tiemFormatter: '{y}-{m}',
      dataType: 'time',
      prop: 'billMonth',
    },
    {
      label: '收入类型',
      prop: 'incomeTypeId',
      width: 80,
      formatter: (row: { incomeTypeId: string | number; }) => {
        return store.dict['incomeType'].obj[row.incomeTypeId]
      }
    },
    {
      label: '应收金额(元)',
      prop: 'receivableMoney',
      dataType: 'money',
      width: 110,
    },
    {
      label: '减免金额(元)',
      prop: 'reductionMoney',
      dataType: 'money',
      width: 110,
    },
    {
      label: '实收金额(元)',
      prop: 'receiptsMoney',
      dataType: 'money',
      width: 110,
    },
  ]
  data.tabConfig = [
    {
      label: '全部',
      id: 100
    },
    {
      label: '租金',
      id: 0
    },
    {
      label: '物管费',
      id: 1
    },
    {
      label: '多经',
      id: 2
    },
  ]
}